66b19a3ce2038542bd0438e3a4ffde568c67932c,build-info-client/src/main/java/org/jfrog/build/client/PreemptiveHttpClient.java,PreemptiveHttpClient,setProxyConfiguration,#String#number#String#String#,76
Before Change
HttpHost proxy = new HttpHost(host, port);
httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
if (username != null) {
httpClient.getCredentialsProvider().setCredentials(
new AuthScope(host, port),
new UsernamePasswordCredentials(username, password)
);
}
}
After Change
if (proxyConfiguration.username != null) {
BasicCredentialsProvider basicCredentialsProvider = new BasicCredentialsProvider();
basicCredentialsProvider.setCredentials(new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT),
new UsernamePasswordCredentials(proxyConfiguration.username, proxyConfiguration.password));
httpClientBuilder.setDefaultCredentialsProvider(basicCredentialsProvider);
}
}